import request from '@/utils/request'
import apiArr from '@/kaowu_api'

export function pointList(params) {
  return request({
    url: apiArr.pointList,
    method: 'get',
    params
  })
}
export function pointAdd(data) {
  return request({
    url: apiArr.pointAdd,
    method: 'post',
    data
  })
}
export function pointEdit(params, method = 'post') {
  if (method == 'post') {
    return request({
      url: apiArr.pointEdit,
      method,
      data: params
    })
  } else {
    return request({
      url: apiArr.pointEdit,
      method,
      params
    })
  }
}
export function pointDelete(data) {
  return request({
    url: apiArr.pointDelete,
    method: 'post',
    data
  })
}
export function pointModifyState(data) {
  return request({
    url: apiArr.pointModifyState,
    method: 'post',
    data
  })
}
